/**
 * 
 */
package com.wbcs.jbsf.util;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 服务器到客户端回写封装
 * @author hawkfly
 */
public class Server2Client
{
    protected PrintWriter out;
    protected HttpServletRequest request;
    protected HttpServletResponse response;
    public Server2Client(HttpServletRequest request, HttpServletResponse response){
        this.request = request;
        this.response = response;
        try
        {
            out = response.getWriter();
        }catch(IOException e)
        {
            e.printStackTrace();
        }
    }
    public void write2ClientMenus(String location ,List<Map<String, Object>> menues){
        request.setAttribute(location,menues);
    }
    public void write2ClientRs(String str){
        out.print(str);
    }
    public void close(){
        out.close();
    }
}

